package com.zhao.blog.service;

import com.zhao.blog.dao.UserDao;
import com.zhao.blog.pojo.User;
import com.zhao.blog.utils.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xiaoZhao
 * @date 2021/12/26
 * @describe
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserDao userDao;

    @Override
    public User checkUser(String username, String password) {
        User user=userDao.findByUsernameAndPassword(username, MD5Util.code(password));
        return user;
    }
}
